package com.zj.core.ui

import android.content.Context
import android.view.Gravity
import android.view.View
import android.widget.LinearLayout
import android.widget.VideoView
import com.zj.core.R
import org.jetbrains.anko.*

class VideoPlayUi(groupView: LinearLayout): AnkoComponent<Context> {
    private var view: LinearLayout=groupView
    lateinit var videoView: VideoView

    override fun createView(ui: AnkoContext<Context>): View =with(view){
        linearLayout{
            id= R.id.record_item_parent_view
            orientation= LinearLayout.VERTICAL
            gravity=Gravity.CENTER
            backgroundColor=resources.getColor(R.color.colorsWhite)
            lparams(width= matchParent,height = matchParent)

            videoView=videoView{
            }.lparams(width= matchParent,height = wrapContent)
        }
    }
}